<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Data Visualization</title>
<link rel="stylesheet" type="text/css" href="../style.css" media="screen" />
<!-- CHART STUFF -->
<script type="text/javascript" src="../local/webfxlayout.js"></script>
<script type="text/javascript" src="../includes/excanvas.js"></script>
<script type="text/javascript" src="../includes/wz_jsgraphics.js"></script>
<script type="text/javascript" src="../includes/chart.js"></script>
<script type="text/javascript" src="../includes/canvaschartpainter.js"></script>
<script type="text/javascript" src="../includes/jgchartpainter.js"></script>
<script type="text/javascript" src="../includes/demo.js"></script>
<link rel="stylesheet" type="text/css" href="../includes/canvaschart.css">
</head>
<body>
<div id="header">
	<div id="logo">
		<h1>Bridge Viz</h1>
	</div>
	<!-- end #logo -->
	<div id="menu">
		<ul>
			<li><a href="project.jsp">The Project</a></li>
			<li><a href="sensors.jsp">Sensor Info</a></li>
			<li class="active"><a href="#">Data Visualization</a></li>
			<li><a href="records.jsp">Records</a></li>
			<li><a href="#">Administration</a></li>
		</ul>
	</div>
	<!-- end #menu -->
</div>
<!-- end #header -->

<%@page import="bridge.*"%>
<%@page import="java.util.ArrayList"%>
<%@page import="java.util.Map"%>
<%@page import="java.text.DecimalFormat"%>

<% 
	Sensor[] sensors;
	Map<Byte, String> sensorDescs;
	
	DatabaseAccessor dba = DatabaseAccessor.getInstance();
	
	sensors = dba.getSensors();
	sensorDescs = dba.getSensorDescriptions();
%>

<div id="page">
	<div>
		<%for(int k = 0; k < sensors.length; k++){%>
		<div class="post">
			<h2 class="title"><%=sensors[k].name + " (" + sensors[k].sensorID + ")"%></h2>
			<div class="entry">
				<div style="float: left; width: 100%; clear:none;">
					<p>
						<%=sensorDescs.get(sensors[k].sensorID)%>
					</p>
				</div>
<!--
				<div style="float: right; padding: 15px; clear:none;">
					<img src="../thumb.png">
				</div>
-->
				<div style="width:100%; height: 200px; margin-left: auto; margin-right: auto; clear:both;">
					<iframe src='chart.jsp?sensorid=<%=sensors[k].sensorID%>&refresh=<%=sensors[k].type.refresh%>&window=<%=sensors[k].type.window%>' width="100%" height="100%" marginheight=0 marginwidth=0 frameborder=0></iframe>
				</div>
			</div>
		</div>	
		<%}%>
	</div>
</div>
<!-- end #page -->
<div id="footer">
	<p>&copy; 2008. All Rights Reserved. Design by <a href="http://www.freecsstemplates.org/">Free CSS Templates</a>.</p>
</div>
<!-- end #footer -->
</body>
</html>
